package edu.nf.db.util.result;

import edu.nf.db.util.ResultSetHandler;
import edu.nf.db.util.RowProcessor;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @Author lzp
 * @Date 2024-05-08
 * 将一条记录转化为Object[]
 */
public class ArrayHandlet implements ResultSetHandler<Object[]> {

    @Override
    public Object[] handle(ResultSet rs) throws SQLException {
        return rs.next()? RowProcessor.toArray(rs):null;
    }
}
